package com.spaceraccoons.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

@Entity(name="phone_number")
@Table(name="phone_number", uniqueConstraints={
		@UniqueConstraint(columnNames={"user", "phone_number"})
})
public class PhoneNumber {

	public enum Type {
		LANDLINE,
		MOBILE;
	}
	
	@Column(name="user", nullable=false)
	private User user;
	
	@Column(name="type")
	private Type type;
	
	@Column(name="phone_number")
	private String phoneNumber;

}
